home *** CD-ROM | disk | FTP | other *** search
- How to crack R!SC's Play The Game CD-Check Crackme by Killer_3K [DSi/Shock]
-
- grab it at E_Bliss's crackme page (crackmes.cjb.net)
- Tools: Sice&a mempatcher (i use R!SC's process patcher ;p)
-
- hey there, in this tut i'll teach u how to crack risc's PTG (play the game)
- CD-Check crackme. This Crackme is pretty nice, it detects sice (via int68),
- sorta hidden crc-check, packed, fake conditional jumps that leads to crash
- and more interesting stuff ;p
- btw, don't bather unpacking it (it's packed w/ upx), as the readme says that
- ur not allowed to unpack in order to patch, it doesn't really matter anywayz,
- cause the way he fucked around w/ it about 96% of the code u'll get after dasm
- will be garbadge :P
-
- ok lets get started :)
- fireup the crackme.. Doh, we get a msgbox saying "Kill Softice Mr. Cracker"
- ok lets get rid of it :) since the first time i got that crackme i didn't
- know how it detected it, so i'll tell u how i figured out how to kill the sice
- w/o knowing it uses int68 :)
-
- 1) bpx on GetModuleHandleA and run the crackme, sice pops, but we see Explorer
- in the down-right corner, we don't want Explorer now do we :) Press F5 again
- till u see 'Play the' in the down-left corner, ok, press F11 and start tracing :)
- u should see this:
-
- 0177:00401143 68F0104000 PUSH 004010F0
- 0177:00401148 50 PUSH EAX
- 0177:00401149 E818060000 CALL KERNEL32!GetProcAddress
- 0177:0040114E A3B2204000 MOV [004020B2],EAX
- 0177:00401153 33C0 XOR EAX,EAX
- 0177:00401155 7533 JNZ 0040118A
- 0177:00401157 3BF6 CMP ESI,ESI
- 0177:00401159 68E7104000 PUSH 004010E7
- 0177:0040115E E80F060000 CALL KERNEL32!GetModuleHandleA
- 0177:00401163 68FE104000 PUSH 004010FE
- 0177:00401168 50 PUSH EAX
- 0177:00401169 3BF6 CMP ESI,ESI
- 0177:0040116B E8F6050000 CALL KERNEL32!GetProcAddress
- 0177:00401170 A3B2204000 MOV [004020B2],EAX
-
- ..
- ok, lets trace abit till we pass
-
- 0177:00401168 50 PUSH EAX
- 0177:00401169 3BF6 CMP ESI,ESI
- 0177:0040116B E8F6050000 CALL KERNEL32!GetProcAddress
- 0177:00401170 A3B2204000 MOV [KERNEL32!AddAtomW],EAX
- 0177:00401175 C70530204000433A2F00MOV DWORD PTR [00402030],002F3A43
-
- 0177:0040117F 688A114000 PUSH 0040118A
- 0177:00401184 FF2507214000 JMP [00402107] <<---
-
- ok, lets trace and pass the jmp
- u should now see this:
-
- 0177:00401442 33D2 XOR EDX,EDX
- 0177:00401444 3BF6 CMP ESI,ESI
- 0177:00401446 7401 JZ 00401449
- 0177:00401448 BD686C1440 MOV EBP,40146C68
- . and some junk code after it
- the jz is gonna jump, let it jump, or else the proggi will crash :]
-
- after the jz is taken, the code changed abit, and will change abit after
- couple of lines u trace.. u should now see this (maybe it will change abit
- during tracing :)):
-
- 0177:00401449 686C144000 PUSH 0040146C <-- will change to Add [edx], BH after we traced it
- 0177:0040144E 3AC0 CMP AL,AL <-- will change to INVALID after we traced it
- 0177:00401450 7401 JZ 00401453
- .
-
- ok this jz must be taken as well, or proggi will crash :)
- after it comes an interesting piece of code (which change after u trace):
-
- 0177:00401453 64FF32 PUSH DWORD PTR FS:[EDX]
- 0177:00401456 8925A9204000 MOV [004020A9],ESP
- 0177:0040145C 892DAD204000 MOV [004020AD],EBP
- 0177:00401462 648922 MOV FS:[EDX],ESP
- 0177:00401465 3ADB CMP BL,BL
- 0177:00401467 7401 JZ 0040146A (JUMP )
-
- hmm the jz wants to jump here too (i wonder why ;) (note the cmp bl,bl))
- this time we don't have to make it jump, nop it or patch it to 7400 and the anti-sice
- is gone (btw u gotta patch it, as the crackme executes that piece of code over and over..)
- ok, ur prolly wondering why it doesn't detect sice now.. welp that jz leads us to the
- is_sice_there routine..
- lets take a look at that routine
- after u'll take the jz u'll reach
- 0177:0040146A EB20 JMP 0040148C
-
- which will lead us to a VERY interesting piece of code (will keep changing during tracing):
-
- 0177:0040148C 663BF6 CMP SI,SI
- 0177:0040148F 7401 JZ 00401492 (jump) <<
- 0177:00401492 B443 MOV AH,43 ; move 0x43 to AH
- 0177:00401494 CD68 INT 68 ; int68 (no shit ;))
- 0177:00401496 5A POP EDX
- 0177:00401497 3BD2 CMP EDX,EDX
- 0177:00401499 7401 JZ 0040149C (jump) <<
- 0177:0040149C 646789160000 MOV FS:[0000],EDX
- 0177:004014A2 3BF6 CMP ESI,ESI
- 0177:004014A4 7401 JZ 004014A7 (jump) <<
- 0177:004014A7 5A POP EDX
- 0177:004014A8 3BD2 CMP EDX,EDX
- 0177:004014AA 7401 JZ 004014AD (jump) <<
- 0177:004014AD 663D86F3 CMP AX,F386 !!!
- 0177:004014B1 58 POP EAX
- 0177:004014B2 7402 JZ 004014B6 (jump) <<<
-
-
- now, this is the anti-ice part :) u can nop ANY jz from 40148F until 4014B2, and it will kill
- the anti-ice, another way to kill it will be nopping the INT 68, anyway will fit here :)
-
- if u'll keep tracing after 4014B2 w/o touching the jumps/int68 u'll reach this piece of code:
-
- 0177:004014B8 7401 JZ 004014BB (JUMP)
- 0177:004014B6 3BF6 CMP ESI,ESI
- 0177:004014BB 68A5104000 PUSH 004010A5
- 0177:004014C0 C3 RET
- which will lead u to:
- 0177:004014C1 E85F020000 CALL 00401725
- 0177:004010A5 6A00 PUSH 00
- 0177:004010A7 6897104000 PUSH 00401097 ; title (type d 401097 in sice and u'll see doh! in widechar)
- 0177:004010AC 6863104000 PUSH 00401063 ; msg (type d 401063 in sice an u'll see Load anti-ice.. in widechar)
- 0177:004010B1 6A00 PUSH 00
- 0177:004010B3 E8A8060000 CALL USER32!MessageBoxW ; msgbox
- 0177:004010B8 6A00 PUSH 00
- 0177:004010BA E8B9060000 CALL KERNEL32!ExitProcess ; exit proggi
-
- anywayz if u'll patch like i showed u above we'll never reach that place :)
- ok, to make it ez on urself, make a mempatcher to patch the anti-ice (i used R!SC's Process Patcher :))
-
- 2) ok, now we can get to the real part of the protection, run ur loader (which will load&patch the exe :))
- u'll see:
- 'No Disk inserted' (if ur cd-drive is empty) or 'Wrong disk inserted' (if u got a cd in ur drive)
- ok, lets kill that lovely cdcheck :)
- put a bpx on getdrivetypea and run the proggi, u should see this:
-
- 0177:004011A5 FF15B2204000 CALL [KERNEL32!GetDriveTypeA]
- 0177:004011AB 83F805 CMP EAX,05 <-- !!
- 0177:004011AE 75DA JNZ 0040118A
-
- ok, this part checks to see if a drive is a cddrive (if it is, eax=5),
- change it to CMP EAX,03 so it will think HDD=cddrive
- type bc* and bpx on GetVolumeInformationA, sice will break, press F11, u'll see:
-
- 0177:004011F7 3BDB CMP EBX,EBX ; compare ebx w/ ebx heh
- 0177:004011F9 7401 JZ 004011FC ; obviously a fake coditional jump
- 0177:004011FC FE05B1204000 INC BYTE PTR [004020B1]
- 0177:00401202 85C0 TEST EAX,EAX
- 0177:00401204 0F847D000000 JZ 00401287 (won't jump)
- 0177:0040120B BE59204000 MOV ESI,00402059
- 0177:00401210 BF2F114000 MOV EDI,0040112F
- 0177:00401215 B907000000 MOV ECX,00000007
- 0177:0040121A F3A6 REPZ CMPSB ; compare labels (good label on edi, label from hdd on esi)
- 0177:0040121C 755D JNZ 0040127B ; label's rn't the same, goto badboy (will push the Wrong disk text)
- 0177:0040121E E9B8000000 JMP 004012DB ; this will leads to the 'goodboy' part, and then creates the dialog
-
- 3) ok, we patched CMP EAX,05 to CMP EAX,03, and nopped JNZ 40127B (or just patched it to 7500 which will make it jump to the next byte)
- ok, type bc* and press F5.. WTF?! 'Try harder!! You WILL crackme!'
- checksum.. hmm, ok update the mempatcher w/ the cdcheck, and lets get ready to kill that checksum
- put back that bpx on GetDriveTypeA, ok sice breaks, the CMP EAX,05 should be patched, if not the patch it w/ sice
- type BC* and then type BPM 004011AB R, this will make sice break when the crackme will try to read that addi
- press F5.. Boom, sice breaks, the proggi is trying the read the part, i wonder why ;)
- u should see this piece of code:
-
- 0177:004014F9 3AC0 CMP AL,AL
- 0177:004014FB 7401 JZ 004014FE ; fake conditional jump
- 0177:004014FE 03040E ADD EAX,[ECX+ESI] <-- add the byte located in Current Location+Counter to EAX
- 0177:00401501 663BF6 CMP SI,SI <<--- u start here
- 0177:00401504 7401 JZ 00401507 ; fake conditinal jump
- 0177:00401507 49 DEC ECX ; decrease counter
- 0177:00401508 75EF JNZ 004014F9 ; are we done? if no then do the whole thing again
- as u can see this basicly reads a byte located 4014FE + Counter, adds it to eax
- and does it till counter = 0
-
- ok, to make it abit faster, type bc*, and bpx on 40150A, and press F5
- u'll reach this VERY interesting piece of code:
-
- 0177:0040150A 59 POP ECX
- 0177:0040150B 5E POP ESI
- 0177:0040150C 663BFF CMP DI,DI
- 0177:0040150F 7401 JZ 00401512 (jump) ; fake conditional
- 0177:00401512 3D31B88FE0 CMP EAX,E08FB831 ; compare result of the checksum w/ a hardcoded result (which is correct one)
- 0177:00401517 7543 JNZ 0040155C ; << results rn't the same, BADBOY ;p
- 0177:00401519 3AD2 CMP DL,DL
- 0177:0040151B 7401 JZ 0040151E ; fake conditonal (which will change the code below to RET)
- 0177:0040151E C3 RET ; we're done, no harm was been done ;)
-
- weee!
- just np the JNZ at 401517 (or patch it to 7500)
- and we're doneeeeeeeeeeeeeeeeeeeeeeeeeeeeeee! :)
-
- i hope u enjoyed reading this tut and that u learned something new :)
- heres my mempatch script (compile w/ R!SC's process patcher ;p)
-
- ----------------------cut here-------------------
- T=60000:
- f=Playth~1.exe: ; filename
- o=PTG_loader.exe: ; loader to create
- p=401467/74,01/74,00: ;da anti-ice
- p=4011AB/83,F8,05/83,F8,03: ; make the crackme think hdd=cdrom
- p=40121C/75,5D/75,00: ; DriveVolume Check
- p=401517/75,43/75,00: ; did i fuck around w/ the cd check? sure i didn't ;)
- $
- ----------------------cut here-------------------
-
-
- Greetings to (no specific order): R!SC, Acid_Burn, AB4DS, Kathras, Whizkid, Ordoc,
- Aerosmith, primevil, Senat0r, Cyclonex, Coffee, TORN@DO.
-
- Also a SPECIAL-u-r-a-piece-of-shit-lamer goes to: Wekeke (aka Loko-Man)
- thx for all the funny logs *g*
-
- Welp, thats about it ;p if i forgot ur name then don't get pissed, i sorta wrote
- that part in a hurry ;p
- Cya all :)
-
-
-
-
- -Killer_3K [DSi/Shock]